import React, { PureComponent } from 'react';
import { connect } from 'dva';
import 'moment/locale/zh-cn';
import { ModalC } from '../../../comps';
import { Row } from 'antd';

@connect(({ stationModel, loading }) => ({
  stationModel,
  loading,
}))
export default class instModal extends PureComponent {
  render() {
    const { saveVisible, titleModal, cancel, saveModal, confirmRevise, relatedUser } = this.props;

    return (
      <div>
        <ModalC
          title={titleModal}
          visible={saveVisible}
          onOk={confirmRevise}
          onCancel={cancel}
          width={750}
          confirmLoading={this.props.loading.effects['stationModel/saveTable'] == true}
        >
          <div>
            <Row style={{ margin: '0 10px 10px 0' }}>{saveModal()}</Row>
            <Row style={{ marginBottom: '10px' }}>{relatedUser()}</Row>
          </div>
        </ModalC>
      </div>
    );
  }
}
